<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../base/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="../../base/plugins/font-awesome-4.7.0/css/font-awesome.css" />
		<link rel="stylesheet" href="../../base/css/indexcss.css"/>
		
		<script src="../../base/js/jquery-1.11.3.min.js"></script>
		<script src="../../base/plugins/layui/layui.js"></script>
		<script src="../../base/js/indnexjs.js"></script>
	</head>
	<body style='overflow:scroll;overflow-y:hidden'>
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo">
					<i class="fa fa-quora" aria-hidden="true"></i> 统一身份认证系统
				</div>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a id="layui-nav-child-color" class="username"></a>
						<dl class="layui-nav-child">
							<dd>
								<a class="li_item"  data-id="401" data-url="personalManager/gerenxinxi.html"  >个人信息</a>
							</dd>
							<dd>
								<a  class="li_item" data-id="402" data-url="personalManager/gerenshezhi.html">个人设置</a>
							</dd>
							<dd>
								<a href="">注销</a>
							</dd>
						</dl>
					</li>
				</ul>
			</div>
			<div class="layui-side">
				<div class="layui-side-scroll layui-bg-black">

					<ul class="layui-nav layui-nav-tree dierji" lay-filter="test">
						<!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
						<li class="layui-nav-item layui-nav-itemed">
							<a href="#" class="li_item" data-id="1"  data-url="main.html"><i class="fa fa-home" aria-hidden="true"></i>&nbsp;首页</a>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a  class="li_item" href="javascript:;" data-id="2" data-url=""><i class="fa fa-bug" aria-hidden="true"></i>&nbsp;swagger</a>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" data-id="3" data-url=""><i class="fa fa-cogs" aria-hidden="true"></i>&nbsp;系统管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="li_item" data-id="301" data-url="systemlLogManager/loginrizhi.html"  ><i class="fa fa-address-book" aria-hidden="true"></i>&nbsp;登录日志</a>
								</dd>
								<dd>
									<a  class="li_item" data-id="302" data-url="systemlLogManager/caozuorizhi.html" ><i class="fa fa-book" aria-hidden="true"></i>&nbsp;操作日志</a>
								</dd>
								<dd>
									<a class="li_item" data-id="303" data-url="roleManager/roleguanli.html"><i class="fa fa-cubes" aria-hidden="true"></i>&nbsp;角色管理</a>
								</dd>
								<dd>
									<a  class="li_item" data-id="304" data-url="userManager/userchangkan.html"><i class="fa fa-user" aria-hidden="true"></i>&nbsp;用户管理</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>
  
			<div class="layui-body">
				<!-- 内容主体区域 -->
				
			<div class="layui-tab layui-tab-brief" lay-allowClose="true" lay-filter="demo">
					<!--嵌套页面选项卡-->
					<ul class="layui-tab-title">
						<li lay-id="lid_1" class="layui-this">首页</li>
					</ul>
					<!--嵌套页面容器-->
					<div class="layui-tab-content">
						<!--嵌套页面项-->
						<div class="layui-tab-item layui-show">
							<iframe src="indexone.html" id="ifm_1"></iframe>
						</div>
					</div>
				</div>
			</div>

			<div class="layui-footer">
				<!-- 底部固定区域 -->
				@湖南科技职业学院
			</div>
		</div>
		<script>
			function username(){
				$(".username").html("<img src='//t.cn/RCzsdCq'  class='layui-nav-img'>");
				if(localStorage.getItem("headImg")){
					$("headImg").attr("src",localStorage)
				}
					$(".username").text(localStorage.getItem("userName"));
				}
			username();
			
			//查找菜单
			function find_myMenu() {
				$.ajax({
					type:"get",
					url:"../../base/data/caidan.json",
					async:true,
					/*"beforeSend":function(){
						layer.load(1,{
							shade:[0.5,"red"]//  背景阴影，第一个透明度，第二个颜色
						});
					},*/
					
					"success":function(result){
						if(result.resultCode==0){
							
							build_MyMenu(result);
							layui.use('element', function() {   //这里是给layui从新渲染一遍
       							var element = layui.element;
        						element.init();
   							});
						}else{
							/*layer.msg(result.message,{
								icon:2,
								time:1000
							});*/
						}
					}
				});	
			}
				
				
			function build_MyMenu(result){
				
				$.each(result.data.menu_1,function(infoindex,info){
					var li=$("<li class='layui-nav-item'><li>");	
					var a=$("<a href='javascript:;' data-id='"+info.code+"' data-url=''><i class='fa fa-cogs' aria-hidden='true'></i>&nbsp;"+info.name+"</a>");
					var dl=$("<dl class='layui-nav-child'></dl>");
					
					$.each(result.data.menu_2,function(infoindex,info){
						var asd=$("<dd><a class='li_item' data-id='"+info.code+"' data-url='"+info.url+"'  ><i class='fa fa-address-book' aria-hidden='true'></i>&nbsp;"+info.name+"</a><dd>");
						dl.append(asd);
					});
					li.append(a,dl);
					$(".dierji").append(li);
				});
			}
			find_myMenu();	
			
		</script>
	</body>
	
</html>